package com.ktjiaoyu.service.impl;

import com.ktjiaoyu.entity.SysRole;
import com.ktjiaoyu.mapper.SysRoleMapper;
import com.ktjiaoyu.service.SysRoleService;
import jakarta.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @return 13141
 * 2025/7/3
 * 10:00
 */
@Service
public class SysRoleServiceImpl implements SysRoleService {
    private static final Logger LOGGER = LoggerFactory.getLogger(SysRoleServiceImpl.class);
    @Resource
    private SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRole> findAll() throws Exception {
        try {
            return sysRoleMapper.getAll();
        } catch (Exception e) {
            LOGGER.error("执行SysRoleServiceImpl.findAll()方法出现异常." ,e);
            throw e;
        }
    }
}
